/*
 * FileName: ProviderDemo.java
 * Author:   zzw
 * Date:     2019年01月15日
 * Description:
 *//*

package com.zzw.rocketmq;

import org.apache.rocketmq.client.producer.SendCallback;
import org.apache.rocketmq.common.message.Message;
import com.chezhibao.cmq.client.CmqProducer;
import org.apache.rocketmq.client.exception.MQBrokerException;
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.client.producer.SendResult;
import org.apache.rocketmq.remoting.exception.RemotingException;
import java.util.UUID;

*/
/**
 * 〈〉<br>
 * 〈〉
 *
 * @author zzw
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本]（可选）
 *//*

public class ProviderDemo {

    public static void main(String[] args) throws MQClientException, RemotingException, InterruptedException, MQBrokerException {
        CmqProducer producer = new CmqProducer("retry");
        producer.setInstanceName(UUID.randomUUID().toString());
        producer.setNamesrvAddr("172.28.4.11:9876");
        producer.start();

        for(int i = 0;i < 10;i++){
            Message msg = new Message("retry", "1", "1", ("hello" + i).getBytes());
            producer.send(msg, new SendCallback() {
                @Override
                public void onSuccess(SendResult sendResult) {
                    System.out.println("id:--->" + sendResult.getMsgId() + ",result:--->" + sendResult.getSendStatus());
                }

                @Override
                public void onException(Throwable e) {
                    e.printStackTrace();
                }
            });
        }
    }
}
*/
